<script setup>
import {defineProps, defineEmits, computed} from 'vue';
import { useHomeStore } from "@/stores/home";
const store = useHomeStore();

const emits = defineEmits(['update:modelValue'])
const props = defineProps({
  modelValue: {
    type: Boolean,
    default: false
  },
  title: {
    type: String,
    required: true
  }
})

const middleman = computed({
  get() {
    return props.modelValue
  },
  set(val) {
    emits('update:modelValue', val)
  }
})
</script>

<template>
  <el-dialog
    v-model="middleman"
    :title="props.title"
    center
    style="border-radius: 12px"
    width="min(600px, 90%)"
    :append-to-body="true"
  >
    <slot />
  </el-dialog>
</template>